This disclosure relates generally to the field of digital imaging. More particularly, but not by way of limitation, it relates to techniques for detecting and mitigating lens flare effects in panoramic images.
Lens flare is the light scattered in lens systems through internal reflections in the lens. Flare is caused by a very bright light source (e.g., the sun) that is either in the image or shining at the lens from a certain angle. The aspect of flare in natural images is determined by the shape of the camera aperture and it is expected to have an almost regular shape, e.g., rings, circles, straight lines across the image, etc.
Panoramic images may be created by stitching together images or slices of images of a sequence of images captured by an imaging device. Typically, the imaging device is rotated on an axis, taking the sequence of images as the imaging device rotates. In some imaging devices, a sequence of narrow segments or slices, one from each of the captured images of the sequence of images is used to create the panoramic image, rather than the entire captured image, allowing a closer approximation a surface of a cylinder about the imaging device. The slices are then aligned and stitched together. The field of view of each slice overlaps the field of view of the preceding slice in the sequence. Rather than simply overlaying one slice on top of the other, the resulting panoramic image the overlap area is stitched along a seam so that a portion of the overlap area on one side of the seam is taken from the predecessor slice and a portion of the overlap area on the other side of the seam is taken from the successor slice. To avoid apparent motion artifacts, the seam is often not a straight line, but may be a complex curve across the overlapped area of a pair of slices.
Lens flare patterns change their location with the camera movement in accordance to the angle between the optical axis of the camera and the bright light source. Consequently, a set of images captured for creating a panoramic view of the scene may be affected by flare in different ways depending on the camera orientation when capturing each image. Stitching such images together may result in artifacts like unnatural jaggy flare borders 110 illustrated in the photograph reproduced in FIG. 1.